import Home from "../pages/Home/Home";
import Ref from "../pages/Ref/Ref";
import Hooks from "../pages/Hooks/Hooks";
import Todolist from "../pages/Todolist/Todolist";
import Heros from "../pages/Heros/Heros";
import Duanzi from "../pages/Duanzi/Duanzi";
import News from "../pages/News/News";
import Guonei from "../components/Guonei/Guonei";
import Junshi from "../components/Junshi/Junshi";
import { Navigate } from "react-router-dom";
import NotFound from "../pages/NotFound/NotFound";
import HerosCon from "../pages/HerosCon/HerosCon";

export default [
    {
        path:'/home',
        element:<Home/>
    },
    {
        path:'/ref',
        element:<Ref/>
    },
    {
        path:'/hooks',
        element:<Hooks/>
    },
    {
        path:'/todolist',
        element:<Todolist/>
    },
    {
        path:'/heros',
        element:<Heros/>
    },
    {
        path:'/duanzi',
        element:<Duanzi/>
    },
    {
        path:'/news',
        element:<News/>,
        children:[
            {
                path:'/news/guonei',
                element:<Guonei/>
            },
            {
                path:'junshi',
                element:<Junshi/>
            },
            {
                index:true,
                element:<Navigate to='/news/guonei'/>
            }
        ]
    },
    //静态路由
    {
        path:"/heroscon",
        element:<HerosCon/>
    },
    //动态路由
    // {
    //     path:"/heroscon/:id/:name",
    //     element:<HerosCon />
    // },
    {
        path:'*',
        element:<NotFound/>
    }

]